Skip to content

Instantly share code, notes, and snippets.

View ogabrielp's full-sized avatar

Gabriel Costa ogabrielp

  • Stem.is
  • Rio de Janeiro - Brazil
  • 18:44 (UTC -03:00)
View GitHub Profile
@ogabrielp
ogabrielp / react-parcel.sh
Last active May 20, 2024 02:06
Setup minimal React with Parcel
# References:
# 1. https://blog.logrocket.com/build-component-library-react-typescript/
# 2. https://parceljs.org/recipes/react/
react-parcel () {
# Create folder
mkdir "$1" && cd "$_"
# Initialize package.json and git local repo
npm init -y
@ogabrielp
ogabrielp / miojo.py
Last active December 1, 2021 19:51
miojo
def get_minimum_time_to_prepare(t, a, b):
# Validar os parametros ne familia
if t < 0 or a < 0 or b < 0:
raise ValueError('tempo negativo amigo?')
if t > a and t > b:
raise ValueError('t tem que ser menor que a ou b.')
# Se alguma das ampulhetas for exatamente o tempo que ele precisa retorna direto
if t == a:
return a
@ogabrielp
ogabrielp / netflixSkip.js
Created May 5, 2020 15:42
Skips Netflix intros and "continue watching" messages
function checkInterrupter() {
if ($(".interrupter-actions") && $(".interrupter-actions").children.length > 0) {
$(".interrupter-actions").children[0].click()
}
}
function checkSkipIntro() {
if ($(".skip-credits") && $(".skip-credits").children.length > 0) {
$(".skip-credits").children[0].click()
}